for i in range(1, 9 + 1):
    for j in range(1, i + 1):
        if j > 1:
            print(', ', end='')
        print('{:1d} X {:1d} = {:2d}'.format(i, j, i * j), end='')
    print()
